<?php if (!defined('THINK_PATH')) exit();?> <!DOCTYPE html>

<html>

<!--Made By kailuosoft.com, TEL 171 9992 9517 -->

<head>



    <meta charset="utf-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">





    <title>产品下架情况</title>

    <meta name="keywords" content="">

    <meta name="description" content="">



    <link rel="shortcut icon" href="favicon.ico"> <link href="/Public/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">

    <link href="/Public/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">

    <link href="/Public/css/plugins/iCheck/custom.css" rel="stylesheet">

    <link href="/Public/css/animate.min.css" rel="stylesheet">

    <link href="/Public/css/style.min862f.css?v=4.1.0" rel="stylesheet">

  <link href="/Public/css/page.css" rel="stylesheet">

    <link href="/Public/css/new.css" rel="stylesheet">

  

  <script src="/Public/js/jquery.min63b9.js?v=2.1.4"></script>

    <script src="/Public/js/plugins/layer/layer.min.js"></script>



<meta http-equiv="Content-Type" content="text/html; charset=utf-8">



   <script type="text/javascript">


      //传递页码的 js 函数
    function page(page,pagesize){

      if(page)

        $("input[name='page']").val(page);

      if(pagesize)

        $("input[name='pagesize']").val(pagesize);

      $("#searchForm").submit();

    }

    

    function dele(id)

    {

        layer.confirm('确定要删除吗？',

                    {btn:['确定','取消']},

              function(){

                

                location.href="goods_delete/id/"+id

              }),

				  

				  function(){return false;} 

				  

		}

	

	  </script>

	</head>



<body class="gray-bg" style="width:1400px; overflow:auto;">

    <div class="wrapper wrapper-content animated fadeInRight">

         

        <div class="row">

            <div class="col-sm-12">

                <div class="ibox float-e-margins">

                    <div class="ibox-title">

                        <h5>产品下架统计</h5>

                        

                    </div>

                    <div >

                    <form id="searchForm" class="form-inline" method="post" action="" >

                    <div class="row">

                            

                            <div class='search'>

                               <input type="hidden" name="page" value="<?php echo ($page); ?>"/>

                               <input type="hidden" name="pagesize" value="<?php echo ($pagesize); ?>"/>

                              
                              <input class="form-control input-sm cycle_start" type="text" name="sku" placeholder="按SKU" size="10" />
                                &nbsp;&nbsp;&nbsp;&nbsp;

                                <!--  按下架时间 -->
                               <input class="form-control input-sm cycle_start" placeholder="按下架时间" name='off_time_start' id='start' onClick="laydate({istime: true, format: 'YYYY-MM-DD'})" value="<?php echo ($data['starttime']); ?>">						到

                               <input class="form-control input-sm cycle_end" placeholder="结束时间" name='off_time_end' id='end' onClick="laydate({istime: true, format: 'YYYY-MM-DD'})" value="<?php echo ($data['endtime']); ?>"> 


                               <input class="form-control input-sm cycle_start" type="text" name="offshelf_reason" placeholder="按下架原因" />

  
                               <!--  上传产品系统时间  -->

<!--
                               <input class="form-control input-sm cycle_start" placeholder="按产品上传时间" name='up_time_start' id='start' onClick="laydate({istime: true, format: 'YYYY-MM-DD'})" value="<?php echo ($data['starttime']); ?>">            到

                               <input class="form-control input-sm cycle_end" placeholder="结束时间" name='up_time_end' id='end' onClick="laydate({istime: true, format: 'YYYY-MM-DD'})" value="<?php echo ($data['endtime']); ?>">
                               -->

                  <!--
                                <select class="form-control" style="margin-top:-5px;" name="platform" id="buyer">

                                <option value="">按平台</option>

                                	<!--  循环输入平台名称 于选择列表中 -->
                                  <?php
 for($i=1;$i<=8;$i++){ if($data['platform'.$i]!=''){ }else{continue;} } ?>  

                               <!-- </select> -->

                  <button type="submit" class="btn btn-sm btn-primary"> 搜索</button>



                <a class="btn btn-white btn-sm " href="javascript:window.location.reload(true);" data-toggle="tooltip" data-placement="left"   title="刷新"> <i class="glyphicon glyphicon-repeat"></i> 刷新</a>  
                &nbsp;&nbsp;&nbsp;&nbsp;
               
                <a href="<?php echo U('Product/offshelf_add');?>" data-toggle="tooltip" data-placement="right" title="新增下架"> <i class="btn btn-sm btn-primary">新建下架</i></a> 
                  

                &nbsp;&nbsp;&nbsp;&nbsp;
                 <a href="<?php echo U('Product/offshelf_goods_input');?>" data-toggle="tooltip" data-placement="right" title="导入"> <i class="btn btn-sm btn-primary">下架产品导入</i></a> 
                

                  

                            </div>

                        </div>

              </form>

            <form action="" method='post' >

                        <table class="table table-bordered table-striped table-hover">

                            <thead>

                              <tr>

                              <th width="5%"><input class="check-all" type="checkbox" value=""/></th>

                              <th>SKU</th>

                              <th>产品开发人员</th>

                              <th>产品下架时间</th>

                              <th>下架原因</th>

                              

                              <!-- 从数据表 platform 调出平台名称 -->

                              <?php  for($i=1;$i<=8;$i++){ if($data['platform'.$i]!=''){ ?>
                                  <th><?php echo $data['platform'.$i];?></th>
                                <?php }else{ echo ""; } }?>

                              <th>操作</th>

                              </tr>

                            </thead>

                            <tbody>



                            <!-- 循环列出数据 -->
                              <?php if(is_array($offshelf)): foreach($offshelf as $key=>$v): ?><tr>

                                    <td>

                                      <input class="i-checks" type="checkbox" name="ids" value="<?php echo ($v['id']); ?>" />

                                    </td>
                                    <td><?php echo ($v['sku']); ?></td>
                                    <td><?php echo ($v['product_developer']); ?></td>
                                    <!-- 此处进行判断 ，如果值为空， 则显示按钮 -->
                                    <td><?php if($v['offshelf_time'] != ''): echo ($v['offshelf_time']); else: ?>
                                      <a href="<?php echo U('Product/offshelf_date',array( 'offshelf_time'=>date('Y-m-d'), 'id'=>$v['id'] ));?>" style="color: red;">下架日期</a><?php endif; ?>
                                    </td>

                                    <!-- 下架原因 -->
  
                                    <td><?php if($v['offshelf_reason'] != ''): echo ($v['offshelf_reason']); else: endif; ?>
                                    </td>

                                   
                                    

                                    <!-- 循环平台名称并判断 -->

                                    <?php  if($v['time1']!='' && $data['platform1']!=''){ ?>
                                          <td><?php echo $v['time1'];?></td>
                                        <?php } elseif($v['time1']=='' && $data['platform1']!=''){ ?><td>
                                                     <a href="<?php echo U('Product/offshelf_date',array( 'time1'=>date('Y-m-d'), 'id'=>$v['id'] ));?>" style="color: red;">下架日期</a>
                                                </td>

                                        <?php } else{ echo ""; } if($v['time2']!='' && $data['platform2']!=''){ ?>
                                          <td><?php echo $v['time2'];?></td>
                                        <?php } elseif($v['time2']=='' && $data['platform2']!=''){ ?><td><a href="<?php echo U('Product/offshelf_date',array( 'time2'=>date('Y-m-d'), 'id'=>$v['id'] ));?>" style="color: red;">下架日期</a></td>

                                        <?php } else{ echo ""; } if($v['time3']!='' && $data['platform3']!=''){ ?>
                                          <td><?php echo $v['time3'];?></td>
                                        <?php } elseif($v['time3']=='' && $data['platform3']!=''){ ?><td>
                                                    <a href="<?php echo U('Product/offshelf_date',array( 'time3'=>date('Y-m-d'), 'id'=>$v['id'] ));?>" style="color: red;">下架日期</a>
                                                </td>

                                        <?php } else{ echo ""; } if($v['time4']!='' && $data['platform4']!=''){ ?>
                                          <td><?php echo $v['time4'];?></td>
                                        <?php } elseif($v['time4']=='' && $data['platform4']!=''){ ?><td><a href="<?php echo U('Product/offshelf_date',array( 'time4'=>date('Y-m-d'), 'id'=>$v['id'] ));?>" style="color: red;">下架日期</a></td>

                                        <?php } else{ echo ""; } if($v['time5']!='' && $data['platform5']!=''){ ?>
                                          <td><?php echo $v['time5'];?></td>
                                        <?php } elseif($v['time5']=='' && $data['platform5']!=''){ ?><td><a href="<?php echo U('Product/offshelf_date',array( 'time5'=>date('Y-m-d'), 'id'=>$v['id'] ));?>" style="color: red;">下架日期</a></td>

                                        <?php } else{ echo ""; } if($v['time6']!='' && $data['platform6']!=''){ ?>
                                          <td><?php echo $v['time6'];?></td>
                                        <?php } elseif($v['time6']=='' && $data['platform6']!=''){ ?><td><a href="<?php echo U('Product/offshelf_date',array( 'time6'=>date('Y-m-d'), 'id'=>$v['id'] ));?>" style="color: red;">下架日期</a></td>

                                        <?php } else{ echo ""; } if($v['time7']!='' && $data['platform7']!=''){ ?>
                                          <td><?php echo $v['time7'];?></td>
                                        <?php } elseif($v['time7']=='' && $data['platform7']!=''){ ?><td><a href="<?php echo U('Product/offshelf_date',array( 'time7'=>date('Y-m-d'), 'id'=>$v['id'] ));?>" style="color: red;">下架日期</a></td>

                                        <?php } else{ echo ""; } if($v['time8']!='' && $data['platform8']!=''){ ?>
                                          <td><?php echo $v['time8'];?></td>
                                        <?php } elseif($v['time8']=='' && $data['platform8']!=''){ ?><td><a href="<?php echo U('Product/offshelf_date',array( 'time8'=>date('Y-m-d'), 'id'=>$v['id'] ));?>" style="color: red;">下架日期</a></td>

                                        <?php } else{ echo ""; } ?>

                                   <!-- <td>

                                        <a class="btn btn-sm btn-primary" href="<?php echo U('select_history_detailed',array('finish_order_number'=>$v['finish_order_number'],porder_number=>$v['porder_number']));?>">查看明细</a>

                                    </td> -->

                                    <td>

                                        <a class="btn btn-sm btn-primary" href="<?php echo U('del_offshelf_infos',array( 'offshelf_id'=>$v['id'], 'username' => $_SESSION['user'], ));?>">删除</a>

                                    </td>

                                </tr><?php endforeach; endif; ?>                           

                            </tbody>

                        </table>

                        <table width="100%" border="0">

                          <tr>

                            <td >

                           <a class="btn btn-sm btn-primary" title="批量导出" id="daochu_management" >批量导出</a>&nbsp;

                          </tr>

                        </table><br/>

             

            </form>

            

  <!-- 分页代码 -->

<div class="fixed-table-pagination" style="display: block;">

  <div class="pull-left pagination-detail">

    <span class="pagination-info">显示第 <?php echo ($nowpage); ?> 页  <?php echo count($list); ?> 条记录，总共 <?php echo ($count); ?> 条记录</span>

    <span class="page-list">每页显示 

      <span class="btn-group dropup">

        <button type="button" class="btn btn-default  btn-outline dropdown-toggle" data-toggle="dropdown" aria-expanded="false">

          <span class="page-size"><?php echo ($pagesize); ?></span> <span class="caret"></span></button>

          <ul class="dropdown-menu" role="menu">

          <li class="<?php if( $page == 10): ?>active<?php endif; ?>"><a href="javascript:page(1,10,'');">10</a></li>

          <li class="<?php if( $page == 25): ?>active<?php endif; ?>"><a href="javascript:page(1,25,'');">25</a></li>

          <li class="<?php if( $page == 50): ?>active<?php endif; ?>"><a href="javascript:page(1,50,'');">50</a></li>

          <li class="<?php if( $page == 100): ?>active<?php endif; ?>"><a href="javascript:page(1,100,'');">100</a></li>

          </ul>

          </span> 条记录</span>

        </div>


        <!--       翻页功能           -->

        <div class="pull-right pagination-roll">

         <ul class="pagination pagination-outline">

          <li class="paginate_button <?php if( $nowpage == 1): ?>previous disabled<?php endif; ?>"><a href="javascript:" onClick="page(1,<?php echo ($pagesize); ?>,'');"><i class="fa fa-angle-double-left"></i></a></li>

          <li class="paginate_button <?php if( $nowpage == 1): ?>previous disabled<?php endif; ?>"><a href="javascript:" onClick="page(<?php echo ($nowpage); ?>-1,<?php echo ($pagesize); ?>,'');"><i class="fa fa-angle-left"></i></a></li>

           <?php if( $countpage > 10 ): if( $nowpage < 5 ): ?><li class="paginate_button "><a href="javascript:" onClick="page(1,<?php echo ($pagesize); ?>,'');" id="<?php echo ($nowpage==1)?'current':''; ?>">1</a></li>

              <li class="paginate_button "><a href="javascript:" onClick="page(2,<?php echo ($pagesize); ?>,'');" id="<?php echo ($nowpage==2)?'current':''; ?>">2</a></li>

              <li class="paginate_button "><a href="javascript:" onClick="page(3,<?php echo ($pagesize); ?>,'');" id="<?php echo ($nowpage==3)?'current':'' ?>">3</a></li>

              <li class="paginate_button "><a href="javascript:" onClick="page(4,<?php echo ($pagesize); ?>,'');" id="<?php echo ($nowpage==4)?'current':'' ?>">4</a></li>

              <li class="paginate_button "><a href="javascript:" onClick="page(5,<?php echo ($pagesize); ?>,'');" id="<?php echo ($nowpage==5)?'current':'' ?>">5</a></li>

              <li class="paginate_button "><a href="javascript:" onClick="page(6,<?php echo ($pagesize); ?>,'');" id="<?php echo ($nowpage==6)?'current':'' ?>">6</a></li>

              <li class="paginate_button "><a href="javascript:" onClick="page(7,<?php echo ($pagesize); ?>,'');" id="<?php echo ($nowpage==7)?'current':'' ?>">7</a></li>

              <li class="paginate_button "><a href="javascript:" onClick="page(8,<?php echo ($pagesize); ?>,'');" id="<?php echo ($nowpage==8)?'current':'' ?>">8</a></li>

              <li class="paginate_button disabled"><a href="javascript:">...</a></li>

              <li class="paginate_button "><a href="javascript:" onClick="page(<?php echo ($countpage); ?>,<?php echo ($pagesize); ?>,'');"><?php echo ($countpage); ?></a></li>

            <?php elseif($nowpage < $count["num"] and $nowpage >= 5): ?>

              <li class="paginate_button "><a href="javascript:" onClick="page(1,<?php echo ($pagesize); ?>,'');">1</a></li>

              <li class="paginate_button disabled"><a href="javascript:">...</a></li>

              <li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $nowpage-3; ?>,<?php echo ($pagesize); ?>,'');"><?php echo $nowpage-3; ?></a></li>

              <li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $nowpage-2; ?>,<?php echo ($pagesize); ?>,'');"><?php echo $nowpage-2; ?></a></li>

              <li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $nowpage-1; ?>,<?php echo ($pagesize); ?>,'');"><?php echo $nowpage-1; ?></a></li>

              <li class="paginate_button "><a href="javascript:" onClick="page(<?php echo ($nowpage); ?>,<?php echo ($pagesize); ?>,'');" id='current'><?php echo $nowpage; ?></a></li>

              <li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $nowpage+1; ?>,<?php echo ($pagesize); ?>,'');"><?php echo $nowpage+1; ?></a></li>

              <li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $nowpage+2; ?>,<?php echo ($pagesize); ?>,'');"><?php echo $nowpage+2; ?></a></li> 

              <li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $nowpage+3; ?>,<?php echo ($pagesize); ?>,'');"><?php echo $nowpage+3; ?></a></li>

              <li class="paginate_button disabled"><a href="javascript:">...</a></li>

              <li class="paginate_button "><a href="javascript:" onClick="page(<?php echo ($countpage); ?>,<?php echo ($pagesize); ?>,'');"><?php echo ($countpage); ?></a></li>

            <?php else: ?>

              <li class="paginate_button "><a href="javascript:" onClick="page(1,<?php echo ($pagesize); ?>,'');">1</a></li>

              <li class="paginate_button disabled"><a href="javascript:">...</a></li>

              <li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $countpage-4; ?>,<?php echo ($pagesize); ?>,'');" id="<?php echo ($nowpage==($countpage-4))?'current':'' ?>"><?php echo $countpage-4; ?></a></li>

              <li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $countpage-3; ?>,<?php echo ($pagesize); ?>,'');" id="<?php echo ($nowpage==($countpage-3))?'current':'' ?>"><?php echo $countpage-3; ?></a></li>

              <li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $countpage-2; ?>,<?php echo ($pagesize); ?>,'');" id="<?php echo ($nowpage==($countpage-2))?'current':'' ?>"><?php echo $countpage-2; ?></a></li>

              <li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $countpage-1; ?>,<?php echo ($pagesize); ?>,'');" id="<?php echo ($nowpage==($countpage-1))?'current':'' ?>"><?php echo $countpage-1; ?></a></li>

              <li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $countpage; ?>,<?php echo ($pagesize); ?>,'');" id="<?php echo ($nowpage==$countpage)?'current':'' ?>"><?php echo $countpage; ?></a></li><?php endif; ?>

          <?php else: ?>

            <?php $__FOR_START_769090__=0;$__FOR_END_769090__=$countpage;for($i=$__FOR_START_769090__;$i < $__FOR_END_769090__;$i+=1){ ?><li class="paginate_button <?php if( $nowpage == $i+1): ?>previous disabled<?php endif; ?>"><a href="javascript:" onClick="page(<?php echo ($i+1); ?>,<?php echo ($pagesize); ?>,'');" id="<?php echo ($nowpage==($i+1))?'current':'' ?>"><?php echo ($i+1); ?></a></li><?php } endif; ?>

           <li class="paginate_button next <?php if( $nowpage >= $countpage): ?>previous disabled<?php endif; ?>"><a href="javascript:" onClick="<?php if( $nowpage < $countpage ): ?>page(<?php echo ($nowpage); ?>+1,<?php echo ($pagesize); ?>,'');<?php endif; ?>"><i class="fa fa-angle-right"></i></a></li>

           <li class="paginate_button next <?php if( $nowpage >= $countpage): ?>previous disabled<?php endif; ?>"><a href="javascript:" onClick="page(<?php echo ($countpage); ?>,<?php echo ($pagesize); ?>,'');"><i class="fa fa-angle-double-right"></i></a></li>

                </ul>

        </div>

    </div>

  <br/>

  <br/>

  </div>

  </div>

</div>

                    </div>

                </div>

            </div>

             

        </div>

         

    </div>

    <script src="/Public/js/jquery.min63b9.js?v=2.1.4"></script>

    <script src="/Public/js/bootstrap.min14ed.js?v=3.3.6"></script>

    <script src="/Public/js/plugins/peity/jquery.peity.min.js"></script>

    <script src="/Public/js/content.mine209.js?v=1.0.0"></script>

    <script src="/Public/js/plugins/iCheck/icheck.min.js"></script>

    <script src="/Public/js/demo/peity-demo.min.js"></script>

  <script src="/Public/js/plugins/layer/laydate/laydate.js"></script>

   



    <script>

        $(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});

     $(document).ready(function () {

    

            $('.check-all').iCheck({

       



                checkboxClass: 'icheckbox_square-green',

                radioClass: 'iradio_square-green',

            });

        });

    

  

  $(document).ready(function() {

    $('.check-all').on('ifChecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定 

        $('.i-checks').iCheck('check');

      });



    $('.check-all').on('ifUnchecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定 

        $('.i-checks').iCheck('uncheck');

      });

	  

	  

	  

	  

	  $('#finish_All').click(function(){

		    ids='';

		    $('.i-checks').each(function(){

				if($(this).prop('checked'))

				{

					ids+=$(this).val()+',';

				}

			 })

			 if(ids=='')

			 {

				 layer.alert('请选择订单');

				 return false

			 }

		    $(this).attr('href','finishAll?tids='+ids);

			

	  }) 

	  

	  

	  $('#daochu_management').click(function(){

		    ids='';

		    $('.i-checks').each(function(){

				if($(this).prop('checked'))

				{

					ids+=$(this).val()+',';

				}

			 })

       var start = $('#start').val();

       var end = $('#end').val();



			 if(ids==''&&!start&&!end)

			 {

				 layer.alert('请选择产品或选择对应时间段、进行导出');

				 return false

			 }

       if(ids==''){

          $(this).attr('href','<?php echo U("Product/get_xxxxxx_id");?>?start='+start+'&end='+end);

       }else{

          $(this).attr('href','<?php echo U("Product/export_download");?>?source_page=product_offshelf&ids='+ids);

       }

		  

			

	  }) 

    

});

    </script>

    <div style="display:none"><script language="javascript" type="text/javascript" src="http://js.users.51.la/17825721.js"></script>

<noscript><a href="http://www.51.la/?17825721" target="_blank"><img alt="&#x6211;&#x8981;&#x5566;&#x514D;&#x8D39;&#x7EDF;&#x8BA1;" src="http://img.users.51.la/17825721.asp" style="border:none" /></a></noscript></div>

</body>

<!--Made By kailuosoft.com, TEL 171 9992 9517 -->

<script  type="text/javascript"  src="http://g.tbcdn.cn/sj/securesdk/0.0.3/securesdk_v2.js"  id="J_secure_sdk_v2" data-appkey="23416550"></script>


<script type="text/javascript">

  function submitTime(){

  }

</script>

</html>